@import url(//at.alicdn.com/t/font_2751569_c0dhtgz5zy.css);

$border-color: #eee;
$border: 1px solid $border-color;
$droplist-border: 5px solid #fff;
$icon-color: #777;
$icon-color__unfold: #999;
$icon-color__option: #000;

.rte {
  all: initial;
  display: inline-block;
  width: 100%;
  border: $border;
  background-color: #fff;
  position: relative;
  // display: flex;
  // flex-direction: column;
  &-toolbar {
    background-color: #fff;
    width: 100%;
    height: 36px;
    // flex-shrink: 0;
    z-index: 2;
    border-bottom: $border;
    box-sizing: border-box;
    &__main {
      display: flex;
      flex-wrap: wrap;
      flex-direction: row;
    }

    &__select,
    &__button {
      display: inline-block;
      min-width: 36px;
      height: 36px;
      flex-shrink: 0;
      position: relative;
      padding: 5px;
      cursor: pointer;
      box-sizing: border-box;
      .rtei {
        font-size: 16px;
        color: $icon-color;
      }
    }
    // 下拉列表
    &__select {
      &-box {
        height: 100%;
        display: flex;
        font-size: 14px;
        border-radius: 2px;
        overflow: hidden;
        &--selected,
        &--unfold {
          text-align: center;
          display: flex;
          align-items: center;
          justify-content: center;
          &:hover {
            background-color: #f1f1f1;
          }
        }
        &--selected {
          padding: 0 3px;
          margin: 0 0 0 2px;
        }
        &--unfold {
          padding: 0 3px;
          margin: 0 2px 0 0;
          .rtei {
            font-size: 10px;
            color: $icon-color__unfold;
          }
        }
      }
      &-options {
        min-width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff;
        box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%), 0 6px 16px 0 rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%);
        z-index: 3;
        border-radius: 2px;
        font-size: 14px;
        padding: 4px 0;
        list-style: none;
        margin: 0;
        display: none;
        overflow-y: auto;
        box-sizing: border-box;
        border-top: $droplist-border;
        border-bottom: $droplist-border;
        /*滚动条整体样式*/
        &::-webkit-scrollbar {
          width: 2px;
          height: 0;
        }
        /*滚动条滑块*/
        &::-webkit-scrollbar-thumb {
          background: #c1c1c1;
        }
        /*滚动条轨道*/
        &::-webkit-scrollbar-track {
          background: #f1f1f1;
        }
      }
      &-option {
        white-space: nowrap;
        padding: 7px 15px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        &:hover {
          background-color: #f0f0f0;
          cursor: pointer;
        }
        & > .rtei {
          font-size: 20px;
          margin-right: 5px;
          color: $icon-color__option;
        }
      }
    }
    // 按钮
    &__button {
      display: flex;
      justify-content: center;
      align-items: center;
      &-box {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 2px;
        overflow: hidden;
        &:hover {
          background-color: #f1f1f1;
        }
        &.g-active {
          color: #999;
        }
      }
    }
    &__delimiter {
      display: inline-block;
      border-right: $border;
    }
  }
  &-main {
    background-color: #fff;
    width: 100%;
    height: 600px-38px;
    overflow: hidden;
    // flex-grow: 1;
    position: relative;
    display: flex;
    // 默认提示
    &__placeholder {
      color: #999;
      position: absolute;
      top: 0;
      left: 0;
      padding: 0 5px;
      z-index: 1;
    }
    // 编辑区
    &__editable {
      position: relative;
      width: 100%;
      height: 100%;
      overflow-x: hidden;
      overflow-y: scroll;
      z-index: 2;
      padding: 10px 15px;
      &:focus {
        outline: none;
      }
      /*滚动条整体样式*/
      &::-webkit-scrollbar {
        width: 0;
        height: 6px;
      }
      /*滚动条滑块*/
      &::-webkit-scrollbar-thumb {
        background: #c1c1c1;
      }
      /*滚动条轨道*/
      &::-webkit-scrollbar-track {
        background: #f1f1f1;
      }
    }
    // 侧边导航栏
    &__aside {
      position: relative;
      width: 200px;
      height: 100%;
      z-index: 2;
      flex-shrink: 0;
      background-color: palegoldenrod;
    }
    // 浮动菜单
    &__tooltip {
      display: inline-block;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 3;
    }
  }
}
